#ifndef CUSTOMSORTFILTERPROXYMODEL_H
#define CUSTOMSORTFILTERPROXYMODEL_H

#include <QObject>
#include <QSortFilterProxyModel>
#include <QWidget>

#include <QTableView>
#include <QString>
#include <QStandardItemModel>

class CustomSortFilterProxyModel : public QSortFilterProxyModel
{
public:
    explicit CustomSortFilterProxyModel(QObject *parent = nullptr);
protected:
    bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const override;

    /**
     * 追加headerData函数
     * @brief headerData
     * @param section
     * @param orientation
     * @param role
     * @return
     */
    QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;


private:
    int extractNumber(const QString &str) const;
};

#endif // CUSTOMSORTFILTERPROXYMODEL_H
